home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 March / macformat-022.iso / Shareware City / Developers / MW MPW Binaries 1.1.1a2 / mwcPPC / MWCIncludes / time.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-07-18  |  1.2 KB  |  67 lines  |  [TEXT/MMCC]

  1. /* time.h standard header */
  2. #ifndef _TIME
  3. #define _TIME
  4. #ifndef _YVALS
  5. #include <yvals.h>
  6. #endif
  7.  
  8. #if __MWERKS__
  9. #pragma options align=mac68k
  10. #endif
  11.  
  12.         /* macros */
  13. #ifndef NULL
  14. #define NULL    _NULL
  15. #endif
  16. #define CLOCKS_PER_SEC    _CPS
  17.         /* type definitions */
  18. #ifndef _SIZET
  19. #define _SIZET
  20. typedef _Sizet size_t;
  21. #endif
  22. #if !__MWERKS__
  23. typedef unsigned int clock_t;
  24. #else /* __MWERKS__ */
  25. typedef unsigned long clock_t;
  26. #endif /* __MWERKS__ */
  27. typedef unsigned long time_t;
  28. struct tm {
  29.     int tm_sec;
  30.     int tm_min;
  31.     int tm_hour;
  32.     int tm_mday;
  33.     int tm_mon;
  34.     int tm_year;
  35.     int tm_wday;
  36.     int tm_yday;
  37.     int tm_isdst;
  38.     };
  39.  
  40. _EXTERN_C    /* low-level functions */
  41. time_t time(time_t *);
  42. _END_EXTERN_C
  43.  
  44. _C_LIB_DECL    /* declarations */
  45. char *asctime(const struct tm *);
  46. clock_t clock(void);
  47. char *ctime(const time_t *);
  48. double difftime(time_t, time_t);
  49. struct tm *gmtime(const time_t *);
  50. struct tm *localtime(const time_t *);
  51. time_t mktime(struct tm *);
  52. size_t strftime(char *, size_t, const char *,
  53.     const struct tm *);
  54. _END_C_LIB_DECL
  55.  
  56. #if __MWERKS__
  57. #pragma options align=reset
  58. #endif
  59.  
  60. #endif
  61.  
  62. /*
  63.  * Copyright (c) 1994 by P.J. Plauger.  ALL RIGHTS RESERVED. 
  64.  * Consult your license regarding permissions and restrictions.
  65.  */
  66.  
  67.